import React, { Component } from 'react';
import {
  StyleSheet,
  View,
  Text,
  Image,
  TextInput,
  TouchableOpacity,
} from 'react-native';

export default class EditView extends Component { 
  constructor(props) {
    super(props);
    this.state = { text: '' };
  }

  render() { 
    return (
      <View style={LoginStyles.TextInputView}>
        <TextInput
          style={LoginStyles.TextIpunt}
          placeholder={this.props.name}
          onChangeText={(text) => { this.setState({ text }); this.props.onChangeText(text) }}
        />
      </View>
    )
  }
}

const LoginStyles = StyleSheet.create({
  TextInputView: {
    marginTop: 10,
    height: 50,
    backgroundColor: '#fff',
    borderRadius: 5,
    borderWidth: 0.3,
    borderColor: '#000',
    flexDirection: 'column',
    justifyContent:'center',
  },
  TextIpunt: {
    backgroundColor: '#fff',
    height: 45,
    margin:18,
  },
})